package org.hcyspartnoc.demo.common.core.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "aliyun")
public class AliyunConfiguration {
    private String accessKeyId;
    private String accessKeySecret;
    private Oss oss;
    private Sms sms;

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "aliyun.oss")
    public static class Oss {
        private String endpoint;
        private String bucketName;
        private Long expireTime;
    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "aliyun.sms")
    public static class Sms{
        private String endpoint;
    }
}
